#ifndef GUI_H
#define GUI_H

#include "include.h"

void onGUIGameStart(SDL_Surface*);

class GUI_TextBox
{
private:
	SDL_Color guicolor;
	int guix, guiy, guisizex, guisizey;
	int guisec;
	bool guireadonly;
	bool guicreated;
	bool guitoggle;
	bool guiinput;
	bool guimask;
	string guistring;
	string guifont;
	int guifontsize;
public:
	GUI_TextBox(int, int, int, int);
	~GUI_TextBox();
	void SetText(string);
	void SetColor(int, int, int);
	void SetFont(string);
	void SetPos(int, int);
	void Masking(bool);
	void MaxLength(int);
	void ReadOnly(bool);
	void Toggle(bool);
	void Render();
	void Events(SDL_Event&);

	// Returns
	string GetText();
};

class GUI_Button
{
private:
	SDL_Color guicolor;
	int guix, guiy, guisizex, guisizey;
	string guistring;
	string guifont;
	bool guicreated;
	bool guitoggle;
public:
	std::function<void ()> clicked;

	GUI_Button(string, int, int, int, int);
	~GUI_Button();
	void SetText(string);
	void SetColor(int, int, int);
	void SetFont(string);
	void SetPos(int, int);
	void Toggle(bool);
	void Render();
	void Events(SDL_Event&);

	void onGUIClicked();
};

#endif